ArcGIS Data Reviewer API for JavaScript
Show:

_DRSBaseTask Class

Base class for BatchValidationTask, DashboardTask, ReviewerResultsClass. Not intended to be used directly.

Constructor

_DRSBaseTask

(
  • url
)
private

Parameters:

  • url String

    The DataReviewerServer Server Object Extension (SOE) URL. For example:
    http://<hostname>:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/

Methods

createReviewerSession

() Deferred

Creates a new Reviewer session. The Reviewer session stores results from check and batch job execution.

Returns:

Deferred: Dojo object. The callback function in the deferred object will contain a response object that holds ReviewerSession.

getLifecycleStatusStrings

() Deferred

Retrieves a list of localized life cycle status strings from the Reviewer workspace. Each Reviewer result stored in the Reviewer workspace has a life cycle status code that matches one of the strings returned from this method execution. Use these strings to replace the numeric code values when displaying a list of Reviewer results to the user.

Returns:

Deferred: Dojo object. The callback function in the deferred object will contain a response object that holds an array of lifecyclestatus strings.

getReviewerSessions

() Deferred

Returns an array of sessions in a Reviewer workspace. Access the array through either the deferred object or the onGetReviewerSessionsComplete event.

Returns:

Deferred: Dojo object. The callback function in the deferred object will contain a response object that holds an array of ReviewerSession.

Example:

            var url="http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/";
            var dashboardTask=new DashboardTask(url);
            var deferred=dashboardTask.getReviewerSessions();
            deferred.then(function(response)
                {
                    array.forEach(response.reviewerSessions, function(item,i)
                    {
                        document.write("Session name: " + item.sessionName);
                        document.write("<br/>Session Id: " + item.sessionId);
                        document.write("<br/>User name: " + item.userName);
                        document.write("<br/>Version name: " + item.versionName);
                        document.write("<br/>");
                    });
                },
                function(error)
                {
                    document.write("Error occurred: " + error.message);
                }
            );

Events

onCreateReviewerSessionsComplete

Dispatched by createReviewerSession.

Event Payload:

onError

Event Payload:

Example:

        // connect to the onError event of the task
        function onErrorHandler(error)
        {
           alert ("An error occurred. Error message = " + 
                  error.message +" Error code = " +error.code);
        }

onGetLifecycleStatusStringsComplete

Dispatched by getLifecycleStatusStrings.

Event Payload:

  • response Object


    Contains:

    • Array lifecycleStatusStrings

onGetReviewerSessionsComplete

Dispatched by getReviewerSessions.

Event Payload: